/**********************************************************
 * User.java.java
 * Created by Ashutosh
 * Last modified Date: Sep 18, 2008 11:01:28 AM by Ashutosh
 * Revision: <svn revision #>
 * Version : 0.1
 * Copyright (c) 2008 - 2009 cyberThink Infotech Pvt. Ltd., All rights reserved.
 **********************************************************/

package com.printeverywhere.dto;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import com.printeverywhere.util.CommonUtil;
import com.printeverywhere.util.DateUtil;

/**
 * User entity.
 *
 * @author MyEclipse Persistence Tools
 */

public class User implements java.io.Serializable {

	// Fields

	/** The id. */
	private Integer id;

	/** The bankaccount. */
	private Bankaccount bankaccount;

	/** The creditcard. */
	private Creditcard creditcard;

	/** The timezones. */
	private Timezones timezones;

	/** The user. */
	private User user;

	/** The languages. */
	private Languages languages;

	/** The date format. */
	private DateFormat dateFormat;

	/** The number format. */
	private NumberFormat numberFormat;

	/** The Region. */
	private LocationCategories region;

	/** The country. */
	private LocationCategories country;

	/** The state. */
	private LocationCategories state;

	/** The user id. */
	private String userId;

	/** The password. */
	private String password;

	/** The email. */
	private String email;

	/** The first name. */
	private String firstName;

	/** The last name. */
	private String lastName;

	/** The company. */
	private String company;

	/** The job title. */
	private String jobTitle;

	/** The city. */
	private String city;

	/** The zip. */
	private String zip;

	/** The street. */
	private String street;

	/** The phone. */
	private String phone;

	/** The fax. */
	private String fax;

	/** The web site address. */
	private String webSiteAddress;

	/** The vatidnr1. */
	private String vatidnr1;

	/** The vatidnr2. */
	private String vatidnr2;

	/** The promotional code. */
	private String promotionalCode;

	/** The mobile. */
	private String mobile;

	/** The active. */
	private Boolean active = false;

	/** The created date. */
	private Date createdDate = DateUtil.getTodaysDate();

	/** The activation key. */
	private String activationKey = CommonUtil.getRandomValue(8);

	
	private Date lastPaidDate = DateUtil.getTodaysDate();

	/** The users. */
	private Set<User> users = new HashSet<User>(0);

	/** The shop settingses. */
	private Set<ShopSettings> shopSettingses = new HashSet<ShopSettings>(0);
	
	private Double totalPaid = 0.00;

	private Double currentBalance = 0.00;

	/** The bankaccounts. */
	private Set bankaccounts = new HashSet(0);

	/** The creditcards. */
	private Set creditcards = new HashSet(0);

	/** The feedbacks for to user id. */
	private Set<User> feedbacksForToUserId = new HashSet<User>(0);

	/** The blocked buyers for blocked user id. */
	private Set blockedBuyersForBlockedUserId = new HashSet(0);

	/** The blocked buyers for user id. */
	private Set blockedBuyersForUserId = new HashSet(0);

	/** The feedbacks for from user id. */
	private Set<User> feedbacksForFromUserId = new HashSet<User>(0);

	private boolean checked;

	// Constructors

	/**
	 * @return the checked
	 */
	public boolean isChecked() {
		return checked;
	}

	/**
	 * @param checked the checked to set
	 */
	public void setChecked(boolean checked) {
		this.checked = checked;
	}

	/**
	 * default constructor.
	 */
	public User() {
	}

	/**
	 * Instantiates a new user.
	 *
	 * @param id the id
	 */
	public User(Integer id) {
		super();
		this.id = id;
	}

	/**
	 * minimal constructor.
	 *
	 * @param password the password
	 * @param email the email
	 */
	public User(String password, String email) {
		this.password = password;
		this.email = email;
	}

	/**
	 * full constructor.
	 *
	 * @param bankaccount the bankaccount
	 * @param state the state
	 * @param timezones the timezones
	 * @param user the user
	 * @param languages the languages
	 * @param dateFormat the date format
	 * @param numberFormat the number format
	 * @param country the country
	 * @param region the region
	 * @param userId the user id
	 * @param password the password
	 * @param email the email
	 * @param firstName the first name
	 * @param lastName the last name
	 * @param company the company
	 * @param jobTitle the job title
	 * @param city the city
	 * @param zip the zip
	 * @param street the street
	 * @param phone the phone
	 * @param fax the fax
	 * @param webSiteAddress the web site address
	 * @param vatidnr1 the vatidnr1
	 * @param vatidnr2 the vatidnr2
	 * @param promotionalCode the promotional code
	 * @param mobile the mobile
	 * @param active the active
	 * @param createdDate the created date
	 * @param activationKey the activation key
	 * @param bankaccounts the bankaccounts
	 * @param creditcards the creditcards
	 * @param shopSettingses the shop settingses
	 * @param feedbacksForToUserId the feedbacks for to user id
	 * @param users the users
	 * @param blockedBuyersForBlockedUserId the blocked buyers for blocked user id
	 * @param blockedBuyersForUserId the blocked buyers for user id
	 * @param feedbacksForFromUserId the feedbacks for from user id
	 */
	public User(Bankaccount bankaccount, LocationCategories state, Timezones timezones,
			User user, Languages languages, DateFormat dateFormat,
			NumberFormat numberFormat, LocationCategories country,LocationCategories region , String userId,
			String password, String email, String firstName, String lastName,
			String company, String jobTitle, String city, String zip,
			String street, String phone, String fax, String webSiteAddress,
			String vatidnr1, String vatidnr2, String promotionalCode,
			String mobile, Boolean active, Date createdDate, String activationKey,
			Set bankaccounts, Set creditcards, Set shopSettingses,
			Set feedbacksForToUserId, Set users,
			Set blockedBuyersForBlockedUserId, Set blockedBuyersForUserId,
			Set feedbacksForFromUserId) {
		this.bankaccount = bankaccount;
		this.state = state;
		this.timezones = timezones;
		this.user = user;
		this.languages = languages;
		this.dateFormat = dateFormat;
		this.numberFormat = numberFormat;
		this.country = country;
		this.region = region;
		this.userId = userId;
		this.password = password;
		this.email = email;
		this.firstName = firstName;
		this.lastName = lastName;
		this.company = company;
		this.jobTitle = jobTitle;
		this.city = city;
		this.zip = zip;
		this.street = street;
		this.phone = phone;
		this.fax = fax;
		this.webSiteAddress = webSiteAddress;
		this.vatidnr1 = vatidnr1;
		this.vatidnr2 = vatidnr2;
		this.promotionalCode = promotionalCode;
		this.mobile = mobile;
		this.active = active;
		this.createdDate = createdDate;
		this.activationKey = activationKey;
		this.bankaccounts = bankaccounts;
		this.creditcards = creditcards;
		this.shopSettingses = shopSettingses;
		this.feedbacksForToUserId = feedbacksForToUserId;
		this.users = users;
		this.blockedBuyersForBlockedUserId = blockedBuyersForBlockedUserId;
		this.blockedBuyersForUserId = blockedBuyersForUserId;
		this.feedbacksForFromUserId = feedbacksForFromUserId;
	}

	// Property accessors

	/**
	 * Gets the id.
	 *
	 * @return the id
	 */
	public Integer getId() {
		return this.id;
	}

	/**
	 * Sets the id.
	 *
	 * @param id the new id
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * Gets the bankaccount.
	 *
	 * @return the bankaccount
	 */
	public Bankaccount getBankaccount() {
		return this.bankaccount;
	}

	/**
	 * Sets the bankaccount.
	 *
	 * @param bankaccount the new bankaccount
	 */
	public void setBankaccount(Bankaccount bankaccount) {
		this.bankaccount = bankaccount;
	}

	/**
	 * Gets the state.
	 *
	 * @return the state
	 */
	public LocationCategories getState() {
		return this.state;
	}


	/**
	 * Sets the state.
	 *
	 * @param state the new state
	 */
	public void setState(LocationCategories state) {
		this.state = state;
	}

	/**
	 * Gets the timezones.
	 *
	 * @return the timezones
	 */
	public Timezones getTimezones() {
		return this.timezones;
	}

	/**
	 * Sets the timezones.
	 *
	 * @param timezones the new timezones
	 */
	public void setTimezones(Timezones timezones) {
		this.timezones = timezones;
	}

	/**
	 * Gets the user.
	 *
	 * @return the user
	 */
	public User getUser() {
		return this.user;
	}

	/**
	 * Sets the user.
	 *
	 * @param user the new user
	 */
	public void setUser(User user) {
		this.user = user;
	}

	/**
	 * Gets the languages.
	 *
	 * @return the languages
	 */
	public Languages getLanguages() {
		return this.languages;
	}

	/**
	 * Sets the languages.
	 *
	 * @param languages the new languages
	 */
	public void setLanguages(Languages languages) {
		this.languages = languages;
	}

	/**
	 * Gets the date format.
	 *
	 * @return the date format
	 */
	public DateFormat getDateFormat() {
		return this.dateFormat;
	}

	/**
	 * Sets the date format.
	 *
	 * @param dateFormat the new date format
	 */
	public void setDateFormat(DateFormat dateFormat) {
		this.dateFormat = dateFormat;
	}

	/**
	 * Gets the number format.
	 *
	 * @return the number format
	 */
	public NumberFormat getNumberFormat() {
		return this.numberFormat;
	}

	/**
	 * Sets the number format.
	 *
	 * @param numberFormat the new number format
	 */
	public void setNumberFormat(NumberFormat numberFormat) {
		this.numberFormat = numberFormat;
	}

	/**
	 * Gets the country.
	 *
	 * @return the country
	 */
	public LocationCategories getCountry() {
		return this.country;
	}

	/**
	 * Sets the country.
	 *
	 * @param country the new country
	 */
	public void setCountry(LocationCategories country) {
		this.country = country;
	}

	/**
	 * Gets the user id.
	 *
	 * @return the user id
	 */
	public String getUserId() {
		return this.userId;
	}

	/**
	 * Sets the user id.
	 *
	 * @param userId the new user id
	 */
	public void setUserId(String userId) {
		this.userId = userId;
	}

	/**
	 * Gets the password.
	 *
	 * @return the password
	 */
	public String getPassword() {
		return this.password;
	}

	/**
	 * Sets the password.
	 *
	 * @param password the new password
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * Gets the email.
	 *
	 * @return the email
	 */
	public String getEmail() {
		return this.email;
	}

	/**
	 * Sets the email.
	 *
	 * @param email the new email
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * Gets the first name.
	 *
	 * @return the first name
	 */
	public String getFirstName() {
		return this.firstName;
	}

	/**
	 * Sets the first name.
	 *
	 * @param firstName the new first name
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * Gets the last name.
	 *
	 * @return the last name
	 */
	public String getLastName() {
		return this.lastName;
	}

	/**
	 * Sets the last name.
	 *
	 * @param lastName the new last name
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * Gets the company.
	 *
	 * @return the company
	 */
	public String getCompany() {
		return this.company;
	}

	/**
	 * Sets the company.
	 *
	 * @param company the new company
	 */
	public void setCompany(String company) {
		this.company = company;
	}

	/**
	 * Gets the job title.
	 *
	 * @return the job title
	 */
	public String getJobTitle() {
		return this.jobTitle;
	}

	/**
	 * Sets the job title.
	 *
	 * @param jobTitle the new job title
	 */
	public void setJobTitle(String jobTitle) {
		this.jobTitle = jobTitle;
	}

	/**
	 * Gets the city.
	 *
	 * @return the city
	 */
	public String getCity() {
		return this.city;
	}

	/**
	 * Sets the city.
	 *
	 * @param city the new city
	 */
	public void setCity(String city) {
		this.city = city;
	}

	/**
	 * Gets the zip.
	 *
	 * @return the zip
	 */
	public String getZip() {
		return this.zip;
	}

	/**
	 * Sets the zip.
	 *
	 * @param zip the new zip
	 */
	public void setZip(String zip) {
		this.zip = zip;
	}

	/**
	 * Gets the street.
	 *
	 * @return the street
	 */
	public String getStreet() {
		return this.street;
	}

	/**
	 * Sets the street.
	 *
	 * @param street the new street
	 */
	public void setStreet(String street) {
		this.street = street;
	}

	/**
	 * Gets the phone.
	 *
	 * @return the phone
	 */
	public String getPhone() {
		return this.phone;
	}

	/**
	 * Sets the phone.
	 *
	 * @param phone the new phone
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}

	/**
	 * Gets the fax.
	 *
	 * @return the fax
	 */
	public String getFax() {
		return this.fax;
	}

	/**
	 * Sets the fax.
	 *
	 * @param fax the new fax
	 */
	public void setFax(String fax) {
		this.fax = fax;
	}

	/**
	 * Gets the web site address.
	 *
	 * @return the web site address
	 */
	public String getWebSiteAddress() {
		return this.webSiteAddress;
	}

	/**
	 * Sets the web site address.
	 *
	 * @param webSiteAddress the new web site address
	 */
	public void setWebSiteAddress(String webSiteAddress) {
		this.webSiteAddress = webSiteAddress;
	}

	/**
	 * Gets the vatidnr1.
	 *
	 * @return the vatidnr1
	 */
	public String getVatidnr1() {
		return this.vatidnr1;
	}

	/**
	 * Sets the vatidnr1.
	 *
	 * @param vatidnr1 the new vatidnr1
	 */
	public void setVatidnr1(String vatidnr1) {
		this.vatidnr1 = vatidnr1;
	}

	/**
	 * Gets the vatidnr2.
	 *
	 * @return the vatidnr2
	 */
	public String getVatidnr2() {
		return this.vatidnr2;
	}

	/**
	 * Sets the vatidnr2.
	 *
	 * @param vatidnr2 the new vatidnr2
	 */
	public void setVatidnr2(String vatidnr2) {
		this.vatidnr2 = vatidnr2;
	}

	/**
	 * Gets the promotional code.
	 *
	 * @return the promotional code
	 */
	public String getPromotionalCode() {
		return this.promotionalCode;
	}

	/**
	 * Sets the promotional code.
	 *
	 * @param promotionalCode the new promotional code
	 */
	public void setPromotionalCode(String promotionalCode) {
		this.promotionalCode = promotionalCode;
	}

	/**
	 * Gets the mobile.
	 *
	 * @return the mobile
	 */
	public String getMobile() {
		return this.mobile;
	}

	/**
	 * Sets the mobile.
	 *
	 * @param mobile the new mobile
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	/**
	 * Gets the active.
	 *
	 * @return the active
	 */
	public Boolean getActive() {
		return this.active;
	}

	/**
	 * Sets the active.
	 *
	 * @param active the new active
	 */
	public void setActive(Boolean active) {
		this.active = active;
	}

	/**
	 * Gets the created date.
	 *
	 * @return the created date
	 */
	public Date getCreatedDate() {
		return this.createdDate;
	}

	/**
	 * Sets the created date.
	 *
	 * @param createdDate the new created date
	 */
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}

	/**
	 * Gets the activation key.
	 *
	 * @return the activation key
	 */
	public String getActivationKey() {
		return this.activationKey;
	}

	/**
	 * Sets the activation key.
	 *
	 * @param activationKey the new activation key
	 */
	public void setActivationKey(String activationKey) {
		this.activationKey = activationKey;
	}

	/**
	 * Gets the bankaccounts.
	 *
	 * @return the bankaccounts
	 */
	public Set getBankaccounts() {
		return this.bankaccounts;
	}

	/**
	 * Sets the bankaccounts.
	 *
	 * @param bankaccounts the new bankaccounts
	 */
	public void setBankaccounts(Set bankaccounts) {
		this.bankaccounts = bankaccounts;
	}

	/**
	 * Gets the creditcards.
	 *
	 * @return the creditcards
	 */
	public Set getCreditcards() {
		return this.creditcards;
	}

	/**
	 * Sets the creditcards.
	 *
	 * @param creditcards the new creditcards
	 */
	public void setCreditcards(Set creditcards) {
		this.creditcards = creditcards;
	}

	/**
	 * Gets the shop settingses.
	 *
	 * @return the shop settingses
	 */
	public Set getShopSettingses() {
		return this.shopSettingses;
	}


	/**
	 * Gets the feedbacks for to user id.
	 *
	 * @return the feedbacks for to user id
	 */
	public Set getFeedbacksForToUserId() {
		return this.feedbacksForToUserId;
	}

	/**
	 * Gets the users.
	 *
	 * @return the users
	 */
	public Set getUsers() {
		return this.users;
	}

	/**
	 * Gets the blocked buyers for blocked user id.
	 *
	 * @return the blocked buyers for blocked user id
	 */
	public Set getBlockedBuyersForBlockedUserId() {
		return this.blockedBuyersForBlockedUserId;
	}

	/**
	 * Sets the blocked buyers for blocked user id.
	 *
	 * @param blockedBuyersForBlockedUserId the new blocked buyers for blocked user id
	 */
	public void setBlockedBuyersForBlockedUserId(
			Set blockedBuyersForBlockedUserId) {
		this.blockedBuyersForBlockedUserId = blockedBuyersForBlockedUserId;
	}

	/**
	 * Gets the blocked buyers for user id.
	 *
	 * @return the blocked buyers for user id
	 */
	public Set getBlockedBuyersForUserId() {
		return this.blockedBuyersForUserId;
	}

	/**
	 * Sets the blocked buyers for user id.
	 *
	 * @param blockedBuyersForUserId the new blocked buyers for user id
	 */
	public void setBlockedBuyersForUserId(Set blockedBuyersForUserId) {
		this.blockedBuyersForUserId = blockedBuyersForUserId;
	}

	/**
	 * Gets the feedbacks for from user id.
	 *
	 * @return the feedbacks for from user id
	 */
	public Set getFeedbacksForFromUserId() {
		return this.feedbacksForFromUserId;
	}

	/**
	 * Gets the creditcard.
	 *
	 * @return the creditcard
	 */
	public Creditcard getCreditcard() {
		return creditcard;
	}

	/**
	 * Sets the creditcard.
	 *
	 * @param creditcard the creditcard to set
	 */
	public void setCreditcard(Creditcard creditcard) {
		this.creditcard = creditcard;
	}

	/**
	 * Sets the users.
	 *
	 * @param users the users to set
	 */
	public void setUsers(Set<User> users) {
		this.users = users;
	}

	/**
	 * Sets the shop settingses.
	 *
	 * @param shopSettingses the shopSettingses to set
	 */
	public void setShopSettingses(Set<ShopSettings> shopSettingses) {
		this.shopSettingses = shopSettingses;
	}

	/**
	 * Sets the feedbacks for to user id.
	 *
	 * @param feedbacksForToUserId the feedbacksForToUserId to set
	 */
	public void setFeedbacksForToUserId(Set<User> feedbacksForToUserId) {
		this.feedbacksForToUserId = feedbacksForToUserId;
	}

	/**
	 * Sets the feedbacks for from user id.
	 *
	 * @param feedbacksForFromUserId the feedbacksForFromUserId to set
	 */
	public void setFeedbacksForFromUserId(Set<User> feedbacksForFromUserId) {
		this.feedbacksForFromUserId = feedbacksForFromUserId;
	}

	/**
	 * @return the region
	 */
	public LocationCategories getRegion() {
		return region;
	}

	/**
	 * @param region the region to set
	 */
	public void setRegion(LocationCategories region) {
		this.region = region;
	}

	

	public Date getLastPaidDate() {
		return lastPaidDate;
	}

	public void setLastPaidDate(Date lastPaidDate) {
		this.lastPaidDate = lastPaidDate;
	}

	/**
	 * @return the totalPaid
	 */
	public Double getTotalPaid() {
		return totalPaid;
	}

	/**
	 * @param totalPaid the totalPaid to set
	 */
	public void setTotalPaid(Double totalPaid) {
		this.totalPaid = totalPaid;
	}

	/**
	 * @return the currentBalance
	 */
	public Double getCurrentBalance() {
		return currentBalance;
	}

	/**
	 * @param currentBalance the currentBalance to set
	 */
	public void setCurrentBalance(Double currentBalance) {
		this.currentBalance = currentBalance;
	}
}